<template>
  <div class="block">
    <el-pagination
      background
      :current-page="this.page"
      :page-size="this.limit"
      :total="this.total"
      style="padding: 30px 0; text-align: center;"
      layout="total, prev, pager, next, jumper"
      @current-change="changeList">
    </el-pagination>
  </div>
</template>

<script>
  export default {
    name: "Pagination",
    props:{
      total:{
        type: Number,
        default: 0,
      },
      limit: '',
      page: ''
    },
    methods: {
      changeList(page){
        this.$emit('changePage',page)
      }
    },
      data() {
        return {

        }
      }
  }
</script>

<style scoped>
  .block{
    margin-top: 20px;
  }
</style>
